<?php

namespace Bmb\EventBundle\Form;

use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolverInterface;

class EventType extends AbstractType
{
	/**
     * @param FormBuilderInterface $builder
     * @param array $options
     */
    public function buildForm(FormBuilderInterface $builder, array $options)
    {	
        $builder
            ->add('evtTitle', 'text', array('attr' => array(
													'autocomplete' => 'off',
													'placeholder' => 'Nom des parents (ex :Luc et Laura)'
                                                )))
            ->add('evtPlannedDate', 'text', array('attr' => array( 
													'autocomplete' => 'off',
													'placeholder' => 'Date prévue (jj/mm/yyyy)'
                                                )))
            ->add('evtBirthList', 'text', array('required' => false, 'attr' => array(
													'autocomplete' => 'off',
													'placeholder' => 'Liste de naissance (facultatif)',
													'title' => 'Vous pouvez ajouter le lien vers la liste de naissance'
                                                )));
    }
    
    /**
     * @param OptionsResolverInterface $resolver
     */
    public function setDefaultOptions(OptionsResolverInterface $resolver)
    {
        $resolver->setDefaults(array(
            'data_class' => 'Bmb\EventBundle\Entity\Event'
        ));
    }

    /**
     * @return string
     */
    public function getName()
    {
        return 'bmb_eventbundle_event';
    }
}
